<template>
  <div>
    <Header></Header>
    <router-view></router-view>
    <Footer v-show="!$route.meta.isHidden"></Footer>
  </div>
</template>

<script>
import Header from './components/Header'
import Footer from './components/Footer'
export default {
  name: 'App',
  components:{Header, Footer},
  mounted(){
        // 这里的getCategoryList是自己定义的,不是vuex里的
          this.getCategoryList()
  },
    methods: {
    getCategoryList() {
      // 拧开关 触发分发 action对应的函数,本质是在调用action对象的函数
      this.$store.dispatch("getCategoryList")
    }
  }
}
</script>

<style lang="less" scoped>

</style>
